@import '../../styles/variables.scss';

.home-page {
  .page-header {
    text-align: center;
    margin-bottom: $spacing-xl;
    
    h1 {
      font-size: $font-size-xxl;
      color: $text-color;
      margin-bottom: $spacing-sm;
    }
    
    p {
      font-size: $font-size-lg;
      color: $text-color-secondary;
    }
  }
  
  .banner-section {
    margin-bottom: $spacing-xl;
    
    .notice-card {
      height: 500px;
      border-radius: $border-radius-lg;
      box-shadow: $box-shadow-base;
      display: flex;
      flex-direction: column;
      
      .ant-card-head {
        background: linear-gradient(135deg, rgba($primary-color, 0.1) 0%, rgba($primary-color, 0.05) 100%);
        border-bottom: 1px solid $border-color;
        flex-shrink: 0;
        
        .ant-card-head-title {
          font-size: $font-size-lg;
          font-weight: 600;
          color: $text-color;
        }
      }
      
      .ant-card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
      }
      
      .notice-list {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: $spacing-md;
        
        .notice-item {
          padding: $spacing-lg;
          border: 1px solid rgba($border-color, 0.5);
          border-radius: $border-radius-base;
          cursor: pointer;
          transition: all 0.3s ease;
          background-color: $white;
          
          &:hover {
            background-color: rgba($primary-color, 0.05);
            border-color: $primary-color;
            box-shadow: $box-shadow-sm;
            transform: translateX(4px);
          }
          
          .notice-title {
            font-size: $font-size-base;
            font-weight: 500;
            color: $text-color;
            margin-bottom: $spacing-sm;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
          
          .notice-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            
            .notice-time {
              font-size: $font-size-sm;
              color: $text-color-secondary;
            }
          }
        }
      }
      
      .more-btn {
        flex-shrink: 0;
        margin-top: $spacing-md;
        padding-top: $spacing-md;
        border-top: 1px solid $border-color;
      }
    }
  }
  
  .featured-card,
  .recommendations-card {
    margin-bottom: $spacing-xl;
    
    .ant-card-head {
      border-bottom: 1px solid $border-color;
      
      .ant-card-head-title {
        font-size: $font-size-lg;
        font-weight: 600;
      }
    }
    
    .featured-post-card,
    .recommendation-card {
      height: 100%;
      border-radius: $border-radius-base;
      overflow: hidden;
      
      .ant-card-body {
        padding: $spacing-md;
      }
      
      .ant-card-meta {
        .ant-card-meta-title {
          font-size: $font-size-base;
          font-weight: 500;
          margin-bottom: $spacing-sm;
        }
      }
    }
    
    .featured-post-title,
    .recommendation-title {
      font-size: $font-size-base;
      font-weight: 500;
      color: $text-color;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      line-height: 1.4;
      min-height: 2.8em;
    }
    
    .featured-post-meta,
    .recommendation-meta {
      display: flex;
      flex-direction: column;
      gap: $spacing-sm;
      
      .post-stats {
        display: flex;
        gap: $spacing-md;
        
        span {
          @include flex-center;
          gap: 4px;
          font-size: $font-size-sm;
          color: $text-color-secondary;
        }
      }
      
      .price,
      .info {
        font-size: $font-size-lg;
        font-weight: 600;
        color: $error-color;
        margin-top: $spacing-xs;
      }
      
      .info {
        color: $text-color-secondary;
        font-weight: 500;
      }
    }
  }
}
